Assignemnt #51 and Forty-eighth Program
Code
///Name: Derrick Andreasen
///Period: 7
///Program name: forty-eighth Program
///File name: Fourt8Prog.java
///Date Finished:10/26/2015
import java.util.Scanner;
public class Fort8Prog
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
String name;
System.out.print( "What's your last name? " );
name = keyboard.next();
if(name.equals("Hawkes"))
{
System.out.println( "looks like a bit of a wait, \"Hawkes\"." );
}
else if(name.equals("Churny"))
{
System.out.println( "You don't have to wait long, \"Churny\"." );
}
else if(name.equals("Fross"))
{
System.out.println( "That's not bad, \"Fross\"." );
}
else if(name.equals("Johnson"))
{
System.out.println( "It's going to be a while before we get to you, \"Johnson\"." );
}
}
}
Picture of the output